Add support for OSC777 (Send Notification)#20012
Add support for OSC777 (Send Notification)#20012carlos-zamora wants to merge 6 commits intodev/cazamor/toast/basefrom
Conversation
| const auto title = parts.size() >= 2 ? til::at(parts, 1) : std::wstring_view{}; | ||
| const auto body = parts.size() >= 3 ? til::at(parts, 2) : std::wstring_view{}; | ||
| _api.ShowNotification(title, body); | ||
| } |
There was a problem hiding this comment.
After #20009 merged yesterday, I think this now needs an:
else
{
_api.UnknownSequence();
}There was a problem hiding this comment.
Good catch. I never would've caught this haha
There was a problem hiding this comment.
Do we need another one of those here?
terminal/src/terminal/adapter/adaptDispatch.cpp
Lines 3854 to 3857 in 34b985d
| { | ||
| _dispatch->DoDesktopNotification(string); | ||
| break; | ||
| } |
There was a problem hiding this comment.
FWIW, you can drop those braces here.
4357c17 to
aeb531f
Compare
2f5763e to
34b985d
Compare
This comment has been minimized.
This comment has been minimized.
34b985d to
7ea4f2f
Compare
This comment has been minimized.
This comment has been minimized.
| const auto title = parts.size() >= 2 ? til::at(parts, 1) : std::wstring_view{}; | ||
| const auto body = parts.size() >= 3 ? til::at(parts, 2) : std::wstring_view{}; |
There was a problem hiding this comment.
Ideally the body should include everything after the semicolon separating it from the title, so you can potentially include a semicolon in the body itself. That's the way the original urxvt extension worked, and most other terminals shared that behavior back when I last tested. Not a big deal though.
7a378e1 to
33546f1
Compare
Summary of the Pull Request
targets #20010
This adds support for the
OSC 777 ; notify ; title ; body STsequence. This allows client applications to send a notification to the Terminal. When this notification is clicked, it summons the terminal window that sent it.Validation Steps Performed
PR Checklist
Heavily based on #19938
Co-authored by @zadjii-msft